﻿using System.Windows.Forms;
using System.Windows.Threading;
using LocalizationResources = Bookvar.UI.Localization.Resources;

namespace Bookvar
{
	internal class BookvarUpdateProcessCommunicationService : UpdateProcessCommunicationService
	{
		public override void CheckIfUpdateCheckIsNecessary()
		{
			OnUpdateCheckIsNecessary();
		}

		protected override void OnNoNewUpdatesAvailable()
		{
			MainWindow.Dispatcher.Invoke( DispatcherPriority.Input, new ShowYesNoMessageDelegate( ShowDialogMessage ),
			                              LocalizationResources.NoNewUpdates, false, MessageBoxButtons.OK );
			base.OnNoNewUpdatesAvailable();
		}
	}
}